﻿using EPiServer;
using EPiServer.DynamicContent;
using SocialPack.modules.SocialPack.Widgets.Linkedin;

namespace SocialPack.modules.SocialPack.DynamicContent.Linkedin
{
    [DynamicContentPlugIn(
        DisplayName = "Linkedin Share",
        Description = "Displays Linkedin Share",
        ViewUrl = "~/modules/socialpack/dynamiccontent/linkedin/Share.ascx")]
    public partial class Share : UserControlBase
    {
        public string Url { get; set; }

        public Count Count { get; set; }

        protected override void OnLoad(System.EventArgs e)
        {
            base.OnLoad(e);

            if (!string.IsNullOrWhiteSpace(this.Url))
            {
                this.ShareControl.Url = this.Url;
            }

            this.ShareControl.Count = this.Count;
        }
    }
}